MySQL忘记root密码后强制修改密码的方法 发表于 2012-05-08 分类于 技术 阅读次数: 阅读时长 ≈ 1 分钟 首先把mysqld停止 1service mysqld stop 启动mysql,但是要跳过权限表 1/usr/local/mysql/bin/mysqld_safe --skip-grant-tables & 进去mysql,并修改密码 12345mysql -u rootmysql>use mysql;mysql>update user set password=password("newpass") where user="root";mysql>flush privileges;mysql>\q 重新启动mysql,正常进入 相关文章 MySQL备份方法总结 MySQL将显示结果输出到文件 mysql sync_binlog innodb_flush_log_at_trx_commit 深入理解 MariaDB Galera Cluster mysql慢查询